#!/usr/bin/env bash

# MOD_DIR=grub-core
MOD_DIR=/usr/lib/grub/x86_64-efi

grub2-mkimage \
    -o bootx64.efi -O x86_64-efi \
    -c embedded.cfg -p /boot/grub \
    -d $MOD_DIR \
    acpi ahci all_video ata \
    boot \
    cat chain configfile cpio cpio_be \
    disk \
    echo efi_gop efi_uga efinet ehci exfat ext2 \
    f2fs fat file fixvideo font \
    gptsync \
    halt hello help \
    iso9660 \
    linux loopback ls lsacpi lsefi lspci lvm \
    mpi multiboot2 \
    nativedisk net normal ntfs \
    part_gpt part_msdos probe \
    random reboot \
    scsi search search_fs_file search_fs_uuid \
    terminal terminfo \
    uhci usb usb_keyboard usbms \
    video video_bochs video_colors video_fb videoinfo \

return

acpi \
adler32 \
affs \
afs \
afsplitter \
ahci \
all_video \
aout \
appendedsig \
appended_signature_test \
appleldr \
archelp \
asn1 \
ata \
at_keyboard \
backtrace \
bfs \
bitmap \
bitmap_scale \
blocklist \
blscfg \
boot \
bsd \
bswap_test \
btrfs \
bufio \
cat \
cbfs \
cbls \
cbmemc \
cbtable \
cbtime \
chain \
cmdline_cat_test \
cmp \
cmp_test \
configfile \
cpio_be \
cpio \
cpuid \
crc64 \
cryptodisk \
crypto \
cs5536 \
ctz_test \
datehook \
date \
datetime \
diskfilter \
disk \
div \
div_test \
dm_nv \
echo \
efienv \
efifwsetup \
efi_gop \
efi_netfs \
efinet \
efi_uga \
ehci \
elf \
eval \
exfat \
exfctest \
ext2 \
extcmd \
f2fs \
fat \
file \
fixvideo \
font \
fshelp \
functional_test \
gcry_arcfour \
gcry_blowfish \
gcry_camellia \
gcry_cast5 \
gcry_crc \
gcry_des \
gcry_dsa \
gcry_idea \
gcry_md4 \
gcry_md5 \
gcry_rfc2268 \
gcry_rijndael \
gcry_rmd160 \
gcry_rsa \
gcry_seed \
gcry_serpent \
gcry_sha1 \
gcry_sha256 \
gcry_sha512 \
gcry_tiger \
gcry_twofish \
gcry_whirlpool \
geli \
gettext \
gfxmenu \
gfxterm_background \
gfxterm_menu \
gfxterm \
gptsync \
gzio \
halt \
hashsum \
hdparm \
hello \
help \
hexdump \
hfs \
hfspluscomp \
hfsplus \
http \
increment \
iorw \
iso9660 \
jfs \
jpeg \
json \
keylayouts \
keystatus \
ldm \
legacycfg \
legacy_password_test \
linux \
loadbios \
loadenv \
loopback \
lsacpi \
lsefimmap \
lsefi \
lsefisystab \
lsmmap \
ls \
lspci \
lssal \
luks2 \
luks \
lvm \
lzopio \
macbless \
macho \
mdraid09_be \
mdraid09 \
mdraid1x \
memdisk \
memrw \
minicmd \
minix2_be \
minix2 \
minix3_be \
minix3 \
minix_be \
minix \
mmap \
morse \
mpi \
msdospart \
mul_test \
multiboot2 \
multiboot \
nativedisk \
net \
newc \
nilfs2 \
normal \
ntfscomp \
ntfs \
odc \
offsetio \
ohci \
part_acorn \
part_amiga \
part_apple \
part_bsd \
part_dfly \
part_dvh \
part_gpt \
part_msdos \
part_plan \
part_sun \
part_sunpc \
parttool \
password \
password_pbkdf2 \
pata \
pbkdf2 \
pbkdf2_test \
pcidump \
pgp \
pkcs1_v15 \
play \
png \
priority_queue \
probe \
procfs \
progress \
raid5rec \
raid6rec \
random \
rdmsr \
read \
reboot \
regexp \
reiserfs \
relocator \
romfs \
scsi \
search_fs_file \
search_fs_uuid \
search_label \
search \
serial \
setjmp \
setjmp_test \
setpci \
sfs \
shift_test \
signature_test \
sleep \
sleep_test \
smbios \
spkmodem \
squash4 \
strtoull_test \
syslinuxcfg \
tar \
terminal \
terminfo \
test_asn1 \
test_blockarg \
testload \
test \
testspeed \
tftp \
tga \
time \
tpm \
trig \
tr \
true \
udf \
ufs1_be \
ufs1 \
ufs2 \
uhci \
usb_keyboard \
usb \
usbms \
usbserial_common \
usbserial_ftdi \
usbserial_pl2303 \
usbserial_usbdebug \
usbtest \
version \
video_bochs \
video_cirrus \
video_colors \
video_fb \
videoinfo \
video \
videotest_checksum \
videotest \
wrmsr \
xfs \
xnu \
xnu_uuid \
xnu_uuid_test \
xzio \
zfscrypt \
zfsinfo \
zfs \
zstd \
